<!DOCTYPE html>
<html lang="en">
  <head>
    <title>DownloadOperation Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/DownloadOperation" class="dashAnchor"></a>
    <a title="DownloadOperation Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Restofire Docs</a> (85% documented)</p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Restofire Reference</a>
        <img id="carat" src="../img/carat.png" />
        DownloadOperation Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/AnyResponseSerializer.html">AnyResponseSerializer</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/DownloadOperation.html">DownloadOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/NetworkOperation.html">NetworkOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/RequestOperation.html">RequestOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/UploadOperation.html">UploadOperation</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/ParametersType.html">ParametersType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/JSONEncoding.html">JSONEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Result.html">Result</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/ArrayParameterEncoding.html">ArrayParameterEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Authenticable.html">Authenticable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/BackgroundQosable.html">BackgroundQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/BaseRequestable.html">BaseRequestable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Cancellable.html">Cancellable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Configurable.html">Configurable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/CoreDataSyncable.html">CoreDataSyncable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DataUploadable.html">DataUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DefaultQosable.html">DefaultQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Downloadable.html">Downloadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/FileUploadable.html">FileUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/HighQueuePriortizable.html">HighQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LowQueuePriortizable.html">LowQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MultipartUploadable.html">MultipartUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/NormalQueuePriortizable.html">NormalQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Pollable.html">Pollable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Qosable.html">Qosable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/QueuePriortizable.html">QueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Queueable.html">Queueable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Reachable.html">Reachable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/RequestDelegate.html">RequestDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Requestable.html">Requestable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/ResponseSerializable.html">ResponseSerializable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Retryable.html">Retryable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SessionManagable.html">SessionManagable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/StreamUploadable.html">StreamUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Syncable.html">Syncable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Uploadable.html">Uploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/UserInitiatedQosable.html">UserInitiatedQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/UserInteractiveQosable.html">UserInteractiveQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/UtilityQosable.html">UtilityQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Validatable.html">Validatable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/VeryHighQueuePriortizable.html">VeryHighQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/VeryLowQueuePriortizable.html">VeryLowQueuePriortizable</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/Authentication.html">Authentication</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Configuration.html">Configuration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Poll.html">Poll</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Queues.html">Queues</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Reachability.html">Reachability</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Retry.html">Retry</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SessionManager.html">SessionManager</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Validation.html">Validation</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire11DataRequesta">DataRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire12DataResponsea">DataResponse</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire22DataResponseSerializera">DataResponseSerializer</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire15DownloadRequesta">DownloadRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire16DownloadResponsea">DownloadResponse</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire10HTTPHeadera">HTTPHeader</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire11HTTPHeadersa">HTTPHeaders</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire10HTTPMethoda">HTTPMethod</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire12JSONEncodinga">JSONEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire20JSONParameterEncodera">JSONParameterEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire17MultipartFormDataa">MultipartFormData</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire26NetworkReachabilityManagera">NetworkReachabilityManager</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire16ParameterEncodera">ParameterEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire17ParameterEncodinga">ParameterEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire7RFErrora">RFError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire8RFResulta">RFResult</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire7Requesta">Request</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire7Sessiona">Session</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire30URLEncodedFormParameterEncodera">URLEncodedFormParameterEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire11URLEncodinga">URLEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire21URLRequestConvertiblea">URLRequestConvertible</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9Restofire13UploadRequesta">UploadRequest</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>DownloadOperation</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">DownloadOperation</span><span class="o">&lt;</span><span class="kt">R</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="../Classes/NetworkOperation.html">NetworkOperation</a></span><span class="o">&lt;</span><span class="kt">R</span><span class="o">&gt;</span> <span class="k">where</span> <span class="kt">R</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/Downloadable.html">Downloadable</a></span></code></pre>

                </div>
              </div>
            <p>An NSOperation that executes the <code><a href="../Protocols/Downloadable.html">Downloadable</a></code> asynchronously.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire17DownloadOperationCyACyxGx_XeySo10NSProgressCc_So17OS_dispatch_queueCSg0G0tSgAHXetcADmcAA12DownloadableRzlufc"></a>
                    <a name="//apple_ref/swift/Method/init(downloadable:request:downloadProgressHandler:completionQueue:completionHandler:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire17DownloadOperationCyACyxGx_XeySo10NSProgressCc_So17OS_dispatch_queueCSg0G0tSgAHXetcADmcAA12DownloadableRzlufc">init(downloadable:request:downloadProgressHandler:completionQueue:completionHandler:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Intializes an download operation.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span>
    <span class="nv">downloadable</span><span class="p">:</span> <span class="kt">R</span><span class="p">,</span>
    <span class="nv">request</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Typealiases.html#/s:9Restofire15DownloadRequesta">DownloadRequest</a></span><span class="p">),</span>
    <span class="nv">downloadProgressHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt">Progress</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">,</span> <span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span><span class="p">?)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">completionQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span><span class="p">,</span>
    <span class="nv">completionHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt"><a href="../Typealiases.html#/s:9Restofire16DownloadResponsea">DownloadResponse</a></span><span class="o">&lt;</span><span class="kt">R</span><span class="o">.</span><span class="kt">Response</span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span>
<span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>downloadable</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The <code><a href="../Protocols/Downloadable.html">Downloadable</a></code>.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>request</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The request closure.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>completionHandler</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The async completion handler called
when the request is completed</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire17DownloadOperationC4copyAA07NetworkC0CyxGyF"></a>
                    <a name="//apple_ref/swift/Method/copy()" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire17DownloadOperationC4copyAA07NetworkC0CyxGyF">copy()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates a copy of self</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">copy</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Classes/NetworkOperation.html">NetworkOperation</a></span><span class="o">&lt;</span><span class="kt">R</span><span class="o">&gt;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2020 <a class="link" href="https://github.com/Restofire/Restofire" target="_blank" rel="external">Rahul Katariya</a>. All rights reserved. (Last updated: 2020-02-19)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
